﻿QUnit.test("testDiscountFactorPerformanceCalculator", function (assert) {

    calc = new DiscountFactorPerformanceCalculator(25, 0.5, 30, 10);
    calc.onCollisionOrShutdown(250, enumAction.SHUTDOWN);
    calc.onCollisionOrShutdown(250, enumAction.SHUTDOWN);
    netScore = calc.getNetPerformance(1000).netScore;
    assert.equal(calc.getNetPerformance(1000).netScore,25);

    calc = new DiscountFactorPerformanceCalculator(22, 0.5, 30, 10);
    calc.onCollisionOrShutdown(250, enumAction.SHUTDOWN);
    calc.onCollisionOrShutdown(1000, enumAction.COLISSION);
    assert.equal(calc.getNetPerformance(1000).netScore, 26);
    calc.onCollisionOrShutdown(2000, enumAction.COLISSION);
    assert.equal(calc.getNetPerformance(2000).netScore, 8);
});